<div class="dawn-header">
    <div class="dawn-breadcrumb">
		 <span class="layui-breadcrumb">
             <a href="javascript:;">系统管理</a>
             <a><cite>用户管理</cite></a>
         </span>
    </div>
</div>
<div class="dawn-content">
    <div class="layui-row layui-form layui-form-pane">
        <div class="layui-inline">
            <label class="layui-form-label">用户名称</label>
            <div class="layui-inline">
                <input class="layui-input" autocomplete="off" id="name"
                       placeholder="帐号/姓名/手机号" autocomplete="off">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">用户状态</label>
            <div class="layui-inline" style="width: 150px;">
                <select id="status">
                    <option value="">请选择用户状态</option>
                    <option value="1">启用</option>
                    <option value="2">冻结</option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">注册日期</label>
            <div class="layui-inline" style="width: 220px;">
                <input class="layui-input" autocomplete="off" id="time"
                       placeholder="请选择注册日期范围" autocomplete="off">
            </div>
        </div>
        <div class="layui-inline dawn-search-left">
            <button class="layui-btn" id="search"><i class="fa fa-search"></i> 搜索</button>
            <button class="layui-btn" id="reset"><i class="fa fa-trash"></i> 重置</button>
        </div>
    </div>
    <div class="layui-row dawn-table">
        <!-- 表格  -->
        <table id="table" lay-filter="table">
        </table>
    </div>
</div>
<!-- 工具条 -->
<script type="text/html" id="tableToolBar">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" lay-event="add">添加
        </button>
    </div>
</script>
<!-- 表格内按钮 -->
<script type="text/html" id="tableTool">
    <a class="layui-btn layui-btn-xs layui-btn-primary" lay-event="edit">编辑</a>
    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delete">删除</a>
    <a class="layui-btn layui-btn-xs" lay-event="refresh">重置密码</a>
    {{# if(d.status == 1) { }}
    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="freeze">冻结用户</a>
    {{# } }}
    {{# if(d.status == 2) { }}
    <a class="layui-btn layui-btn-xs" lay-event="unfreeze">解除冻结</a>
    {{# } }}
    <a class="layui-btn layui-btn-xs layui-btn-primary" lay-event="setRole">角色分配</a>
</script>
<script id="info" type="text/html">
    <div class="layui-form layui-form-pane dawn-form" lay-filter="info" style="margin: 10px !important;">
        <input type="hidden" name="id">
        <div class="layui-form-item">
            <label class="layui-form-label dawn-form-label">账户</label>
            <div class="layui-input-block">
                <input name="account" lay-verify="required" autocomplete="off"
                       placeholder="请输入账户" class="layui-input"
                       type="text">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label dawn-form-label">性别</label>
            <div class="layui-input-block">
                <select name="sex" lay-verify="required">
                    <option value="">请选择</option>
                    <option value="1">男</option>
                    <option value="2">女</option>
                </select>
            </div>
        </div>
        {{# if(d.password) { }}
        <div class="layui-form-item">
            <label class="layui-form-label dawn-form-label">密码</label>
            <div class="layui-input-block">
                <input name="password" lay-verify="required" autocomplete="off"
                       placeholder="请输入密码" class="layui-input"
                       type="password">
            </div>
        </div>
        {{# } }}
        <div class="layui-form-item">
            <label class="layui-form-label">邮箱</label>
            <div class="layui-input-block">
                <input name="email" autocomplete="off"
                       placeholder="请输入邮箱" class="layui-input"
                       type="text">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label dawn-form-label">姓名</label>
            <div class="layui-input-block">
                <input name="name" lay-verify="required" autocomplete="off"
                       placeholder="请输入姓名" class="layui-input"
                       type="text">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">出生日期</label>
            <div class="layui-input-block">
                <input id="birthday" name="birthday" autocomplete="off"
                       placeholder="请输入邮箱" class="layui-input"
                       type="text">
            </div>
        </div>
        {{# if(d.password) { }}
        <div class="layui-form-item">
            <label class="layui-form-label dawn-form-label">确认密码</label>
            <div class="layui-input-block">
                <input name="rePassword" lay-verify="rePassword" autocomplete="off"
                       placeholder="请输入密码" class="layui-input"
                       type="password">
            </div>
        </div>
        {{# } }}
        <div class="layui-form-item">
            <label class="layui-form-label">电话</label>
            <div class="layui-input-block">
                <input name="phone" autocomplete="off"
                       placeholder="请输入电话" class="layui-input"
                       type="text">
            </div>
        </div>
        <div class="layui-form-item" style="text-align: right;">
            <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="save">保存</button>
        </div>
    </div>
</script>
<script id="assign" type="text/html">
    <div>
        <div class="row" style="position: absolute; top:0; left: 0; right: 0; bottom: 40px;overflow: auto;">
            <div class="ibox-content">
                <ul id="zTree" class="ztree"></ul>
            </div>
        </div>
        <div style="position: absolute;bottom: 2px;left: 0;right: 0;height: 40px;line-height:40px;border-top: 1px solid #eee;">
            <div class="layui-row">
                <div class="layui-col-md12">
                    <div style="float: right;margin-right: 10px;">
                        <button class="layui-btn layui-btn-sm" type="button" id="btn_save">
                            保存
                        </button>
                        <button class="layui-btn layui-btn-sm layui-btn-danger" type="button" id="btn_close">
                            关闭
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</script>
<script>
    layui.laydate.render({
        elem: '#time'
        , range: true
    });
</script>
<script src="${ctxPath}/modular/system/user/user.js?v=${app.version}"></script>